#!/bin/sh
set -eu

# whitespace/comments - doesn't make sense for me
# whitespace/labels - don't like it
# whitespace/braces - { should almost always be at the end of the previous line
# whitespace/blank_line - Blank line at the end of a code block.  Is this needed? - Yeah, I need this empty line
# build/storage_class - cpplient does not C++0x auto type deduction in the following case:
#                       const auto capacity = sizeof(Field) - 1;
#                       turning it off.

CPPLINT_OPTIONS="--filter=\
-whitespace/parens,\
-whitespace/line_length,\
-whitespace/labels,\
-whitespace/braces,\
-whitespace/comments,\
-whitespace/blank_line,\
-build/storage_class,\
"

cd `dirname $0`
find ./src -type f -print | fgrep -v "CMakeLists.txt" | fgrep -v ".svn" | xargs ./cpplint.py ${CPPLINT_OPTIONS}
